package com.baidu.process.chat.core.web.bean.eval;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author: lws
 * @date: 2022/12/15
 */
@Data
@AllArgsConstructor
public class R {

    private boolean success;

    private String msg;

    private Object data;

    public static R ok() {
        return new R(true, "", null);
    }

    public static R ok(Object data) {
        return new R(true, "", data);
    }

    public static R error(String msg) {
        return new R(false, msg, null);
    }
}
